import request from '@/utils/request'

/**
 * 分页
 */
export function admin_merchant_page(params) {
  return request({
    url: '/admin/merchants/pagination',
    method: 'post',
    data: params
  })
}

/**
 * 修改
 */
export function admin_merchant_put(params) {
  return request({
    url: `/admin/merchants/${params.id}`,
    method: 'put',
    data: params
  })
}

/**
 * 删除
 */
export function admin_merchant_del(params) {
  return request({
    url: `/admin/merchants/${params.id}`,
    method: 'delete'
  })
}

/**
 * 添加
 */
export function admin_merchant_add(params) {
  return request({
    url: `/admin/merchants`,
    method: 'post',
    data: params
  })
}

/**
 * 详情
 */
export function admin_merchant_detail(params) {
  return request({
    url: `/admin/merchants/${params.id}`,
    method: 'get',
    data: params
  })
}
